<div class='cat'>
	<?php echo '<h1>'.$name.'</h1>';?>
	<hr color="blue" size="20">
	<?php 
	$col = 3;
	$countsubcate = count($subcate);
	if ($countsubcate>0){//if $countsubcate
		echo '<table class="contentcate">';
			for ($i=0;$i<$countsubcate;$i=$i+$col){//for $countsubcate
				echo '<tr>';
					if(isset($subcate[$i]['cat_name'])){
						echo '<td class="contentcate_td"><div class="cellcatlist">';
							echo '<br>'.anchor(base_url().'welcome/getCatSubId/'.$subcate[$i]['cat_id'],$subcate[$i]['cat_name']).'<br><br>';
							//echo anchor(base_url().'welcome/getCatSubId/'.$subcate[$i]['cat_id'],'<img src="'.base_url().'public/images/'.$subcate[$i]['images'].'" class="statusicon" width="240" height="140">');
							
							$rel = base_url().'public/images/'.$subcate[$i]['images'];
							echo "<a href='".base_url().'welcome/getCatSubId/'.$subcate[$i]['cat_id']."'rel='".$rel."' title='Name Product: ".$subcate[$i]['cat_name']."' class='preview'>";
							echo "<img src='".$rel."' class='statusicon' width='240' height='140'/></a>";
							
							echo '<div class="pricecell">
							Price : '.$subcate[$i]["cat_price"].'<br>
							Size : '.$subcate[$i]["cat_size"].'
							</div>';
						echo '</div></td>';
					}else echo '<td></td>';
					if(isset($subcate[$i+1]['cat_name'])){
						echo '<td class="contentcate_td"><div class="cellcatlist">';
							echo '<br>'.anchor(base_url().'welcome/getCatSubId/'.$subcate[$i+1]['cat_id'],$subcate[$i+1]['cat_name']).'<br><br>';
							//echo anchor(base_url().'welcome/getCatSubId/'.$subcate[$i+1]['cat_id'],'<img src="'.base_url().'public/images/'.$subcate[$i+1]['images'].'" class="statusicon" width="240" height="140">');
							
							$rel = base_url().'public/images/'.$subcate[$i+1]['images'];
							echo "<a href='".base_url().'welcome/getCatSubId/'.$subcate[$i+1]['cat_id']."'rel='".$rel."' title='Name Product: ".$subcate[$i+1]['cat_name']."' class='preview'>";
							echo "<img src='".$rel."' class='statusicon' width='240' height='140'/></a>";
							
							echo '<div class="pricecell">
							Price : '.$subcate[$i+1]["cat_price"].'<br>
							Size : '.$subcate[$i+1]["cat_size"].' 
							</div>';
						echo '</div></td>';
					}else echo '<td></td>';
					if(isset($subcate[$i+2]['cat_name'])){
						echo '<td class="contentcate_td"><div class="cellcatlist">';
							echo '<br>'.anchor(base_url().'welcome/getCatSubId/'.$subcate[$i+2]['cat_id'],$subcate[$i+2]['cat_name']).'<br><br>';
							//echo anchor(base_url().'welcome/getCatSubId/'.$subcate[$i+2]['cat_id'],'<img src="'.base_url().'public/images/'.$subcate[$i+2]['images'].'" class="statusicon" width="240" height="140">');
							
							$rel = base_url().'public/images/'.$subcate[$i+2]['images'];
							echo "<a href='".base_url().'welcome/getCatSubId/'.$subcate[$i+2]['cat_id']."'rel='".$rel."' title='Name Product: ".$subcate[$i+2]['cat_name']."' class='preview'>";
							echo "<img src='".$rel."' class='statusicon' width='240' height='140'/></a>";
							
							echo '<div class="pricecell">
							Price : '.$subcate[$i+2]["cat_price"].'<br>
							Size : '.$subcate[$i+2]["cat_size"].'
							</div>';
						echo '</div></td>';
					}else echo '<td></td>';
				echo '</tr>';
			}//end //for $countsubcate
			echo "<tr>";
				echo"<td colspan='3'>";
					echo $this->pagination->create_links(); 
				echo "</td>";
			echo "</tr>";
		echo '</table>';
	} //end $countsubcate
	else echo '<h1>Data Empty</h1>';
	?>
</div>